package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@NoArgsConstructor
@Getter
@Setter
@TableName("tb_course")
public class Course implements Serializable {
    @TableId(type = IdType.AUTO)//指定自增策略
    private Integer id;

    @TableField("course_name")
    private String courseName;

    @TableField("course_desc")
    private String courseDesc;

    @TableField("course_price")
    private BigDecimal coursePrice;

    @TableField("unit_id")
    private Integer unitId;

    @TableField("major_id")
    private Integer majorId;

    @TableField("pic_url")
    private String picUrl;

    @TableField("visit_count")
    private Integer visitCount;

    @TableField("course_detail")
    private String courseDetail;

    @TableField(exist = false)
    private LocalDateTime createTime;

    @TableField(exist = false)
    private Unit unit;

    @TableField(exist = false)
//    @JsonIgnore(value = true)
    private Major major;



}
